package com.tuling;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
// @Slf4j —— Lombok 依赖  看看IDE是否支持 安装插件
public class Application {

    //1.声明日志记录器
    private static Logger logger = LoggerFactory.getLogger(Application.class);

    public static void main(String[] args) {
        SpringApplication.run(Application.class, args);

        System.out.println(System.getProperty("PID"));
        System.out.println(System.getProperty("LOG_DATEFORMAT_PATTERN"));
        logger.trace("跟踪");
        logger.debug("调试");
        // Springboot 默认的日志级别就是INFO
        logger.info("阅读性较强的一些信息");
        logger.warn("警告，超出了能力范围之内的操作，触发警告");
        logger.error("异常，错误");
    }

}
